1. Field of the Invention
This invention relates generally to data processing, and more particularly, to storing and accessing an instance of a user defined type in a table for optimization of a relational database management system.
2. Description of Related Art
A Relational Database Management System (RDBMS) is a database management system that uses relational techniques for storing and retrieving data. Relational databases are organized into physical tables that consist of rows and columns of data, wherein the data is defined so that it can be reorganized and accessed in a number of different ways. A requesting entity, which may be an application or the operating system, requests database access using a high-level query language.
Simple algebraic operations, such as those embodied in Structured Query Language (SQL), are used to process large amounts of data within a relational database. SQL is a programming language for getting information from, writing information to and updating a database by allowing users to formulate relational operations through queries or requests on tables or views. These table queries may be interactive, in batch files, or embedded in host languages, and may be used to logically link information from multiple tables or views to perform complex sets of procedures. In order to perform such operations, SQL operators are provided that operate on one or two tables and produce a new table as a result.
While relational databases are useful for storing and processing large amounts of data, as the data types become increasingly complex, more focused database models are required for storing and processing such complex data. For instance, object-oriented databases are able to integrate computer code with a variety of different types of data, including, complex and hierarchical data. In such a system, the data values in a column may be objects which have user defined types, which are complex data types that include both state information and methods for using such state information. However, since the ability to access data within an object-oriented database is often cumbersome and difficult, these types of databases are often undesirable and have hindered the development of easy SQL-type access mechanisms.
More recently, object-relational databases have been developed to include the advantages of both the relational and object-oriented databases. Object-relational databases provide the flexibility of storing complex and hierarchical data, along with the ability to access such data through database methodologies, such as those used in relational database modeling (e.g., SQL queries). However, current access to this complex data requires iteration through data tables having columns each with a number of rows. This requires the user of the database to construct an algorithm, or even a number of algorithms, to access such data, which in turn, is time consuming and leads to loss in productivity. Further, since the user defined data may be accessed from different rows, which may or may not reside in different tables, any inaccuracies in the algorithm may undesirably result in the exclusion of or dropping of required user defined data that another data type directly or indirectly makes use of, thereby resulting in an error.
Therefore, there continues to be a need in the art for improved methods, systems and articles for storing and accessing embedded data in a database management system.